package com.tentact.servlets;

import com.tentact.service.MeetingService;
import com.tentact.vo.Meeting;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.annotation.*;
import java.io.IOException;
import java.util.List;

@WebServlet(name = "AllAttributetwoServlet", value = "/AllAttributetwoServlet")
public class AllAttributetwoServlet extends HttpServlet {
    MeetingService service = new MeetingService();

    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        String meetingname = request.getParameter("meetingname");
        if (meetingname != null) {
            Meeting meeting = service.SelectMeetingNameSesson(meetingname);
            List<Meeting> meetings =service.SelectByNameMettingThree(meetingname);


            request.setAttribute("meetingname",meetingname);

            request.setAttribute("meeting", meeting);
            request.setAttribute("meetings",meetings);
            request.getRequestDispatcher("mymeetingdetails.jsp").forward(request, response);
        }
    }

    @Override
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

    }
}
